package net.viralpatel.struts2;


import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

public class ViewxAction extends ActionSupport{
	private String roomType;
	JDBCQuery jdbc;
	private List<Detail> listx;
	
	public String execute()
	{
		try {
			jdbc=new JDBCQuery();
			listx=jdbc.getdetail(roomType);
			System.out.println("kaka"+listx.get(0).getPrice());
			
			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return ActionSupport.SUCCESS;
		
	}
	
	
	public List<Detail> getListx() {
		return listx;
	}
	public void setListx(List<Detail> listx) {
		this.listx = listx;
	}
	
	public String getRoomType() {
		return roomType;
	}
	public void setRoomType(String roomType) {
		this.roomType = roomType;
	}
	
	
	
}
